package com.superm.controller;

import com.superm.mappers.PurchaseDetailsMapper;
import com.superm.service.PurshaseDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;
@RequestMapping("/purDetails")
@Controller
public class PurchaseDetailsController {


    @Autowired
    private PurshaseDetailsService purshaseDetailsService;

    /**
     * 根据订单号查询详情
     * @param purCode
     * @return
     */
    @RequestMapping("/selectCodePurchase")
    @ResponseBody
    public Map<String,Object> selectCodePurchase(@RequestParam("purCode")String purCode,@RequestParam("page") Integer pageNo,@RequestParam("limit") Integer pageSize){
        Map<String,Object> map = purshaseDetailsService.selectPurCodeDetails(purCode,pageNo,pageSize);
        return map;
    }


}
